package com.lyj.mall.enums;

import lombok.Getter;

/**
 * @author lyj
 * @date 2019/12/18 23:54
 */
@Getter
public enum  ResponseEnum {

    ERROR(-1,"服务端错误"),
    SUCCESS(0,"成功"),
    PASSWORD_ERROR(1,"密码错误"),
    USER_EXIT(2,"用户已存在"),
    PARAMETER_ERROR(3,"参数错误"),
    USERNAME_OR_PASSWORD_ERROR(10,"用户名或密码错误"),
    NEED_LOGIN(11,"用户未登入，请登入"),
    NOT_ROLE(12,"权限不足"),
    PRODUCT_NOT_FIND(13,"未找到商品"),
    PRODUCT_OFF_SALE_OR_DELETED(14,"商品已下架或被删除"),
    PRODUCT_STOCK_NOT_ENOUGH(15,"库存不足"),
    CART_PRODUCT_NOT_FIND(16,"购物车中无此商品"),
    SQL_ERROR(17,"sql出错了"),
    DELETE_SHIPPING_ERROR(18,"删除收货地址失败"),
    SHIPPING_NOT_FIND(19,"收货地址不存在"),
    CART_NOT_SELETED_PRODUCT(20,"购物车中无选中商品"),
    ;

    private Integer code;
    private String desc;

    ResponseEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
